package hivi.vn.hivigold.database;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;

public class Preferences {
	public static final String NAMESPACE= "NameSpace";
	public static final String URL= "ServerURL";
	public static final String PRINTURL= "PrintURL";
	public static final String USERID= "UserID";
	public static final String USERNAME= "UserName";
	public static final String PASSWORD= "PassWord";
	public static final String EMPLOYEEID= "EmployeeID";
	public static final String EMPLOYEENAME= "EmployeeName";
	public static final String STOCKID= "StockID";
	public static final String STOCKNAME= "StockName";
	public static final String PARTNERID= "PartnerID";
	public static final String PARTNERNAME= "PartnerName";
	//public static final String VOUCHERTYPE= "VoucherType";
	public static final String SALETYPE= "HtBan1";
	public static final String SALEACCOUNT= "TkBan1";
	public static final String BUYTYPE= "HtMua1";
	public static final String BUYACCOUNT= "TkMua1";
	public static final String SALETYPE2= "HtBan2";
	public static final String SALEACCOUNT2= "TkBan2";
	public static final String BUYTYPE2= "HtMua2";
	public static final String BUYACCOUNT2= "TkMua2";
	public static final String CKACCOUNT= "TkCk";
	public static final String PRINTTYPE= "Printtype";
	//public static final String ACCESS= "Access";
	
	public static final String COMPANYTITLE = "LCDCompanytitle";
	public static final String COMPANYNAME = "LCDCompanyname";
	public static final String TPRICENAME = "LCDTpricename";
	public static final String SOLOGAN = "LCDSologan";
	public static final String ADDRESS = "LCDAddress";
	public static final String PHONE = "LCDPhone";
	public static final String LOGO = "LCDLogo";
	public static final String PRICEDATA = "LCDPricedata";
	public static final String HEADER1 = "LCDHeader1";
	public static final String HEADER2 = "LCDHeader2";
	public static final String HEADER21 = "LCDHeader21";
	public static final String HEADER22 = "LCDHeader22";
	public static final String HEADER3 = "LCDHeader3";
	public static final String WELLCOME = "LCDWellcome";
	
	public static final String SELECTEDTABLEID = "SelectedTableID";
	public static final String SELECTEDTABLENAME = "SelectedTableName";
	public static final String SELECTEDTABLESTATUS = "SelectedTableStatus";
	public static final String SELECTEDTABLESTTREC = "SelectedTableSttRec";
	public static final String SELECTEDTABLEAREAID = "SelectedTableAreaID";
	public static final String SELECTEDTABLEAREANAME = "SelectedTableAreaName";
	public static final String SELECTEDTABLEAREAPOSITION = "SelectedTableAreaPosition";	
	
	public static String getPreferenceValue(Context c,String key)
	{
		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(c);
		return sp.getString(key, "*");
	}
	public static void editPreferenceValue(Context c,String key,String value)
	{
		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(c);
		Editor edit = sp.edit();
		edit.putString(key, value);
		edit.commit();
	}
}
